package com.hundsun.cprs.yyt.common.push;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class PushConfig {

    @Value("${jpush.appKey:}")
    private String jpushAppKey;
    
    @Value("${jpush.masterSecret:}")
    private String jpushMasterSecret;
    
    @Value("${jpush.link.url:}")
    private String linkUrl;

    public String getJpushAppKey() {
        return jpushAppKey;
    }

    public String getJpushMasterSecret() {
        return jpushMasterSecret;
    }
    
    public String getLinkUrl() {
        return linkUrl;
    }
    
    public boolean isOn(){
        if (this.jpushAppKey != null && this.jpushAppKey.length() > 0 &&
            this.jpushMasterSecret != null && this.jpushMasterSecret.length() > 0) {
            return true;
        }
        return false;
    }
}
